//
//  ZSNetworkTool.h
//  online
//
//  Created by guoxiaoshuang on 2018/7/31.
//  Copyright © 2018年  ysyy. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AFNetworking.h>
typedef enum : NSUInteger {
    GET,
    POST
} RequestType;
/** 请求结果的Block */
typedef void(^result)(BOOL success, id responseData);
@interface ZSNetworkTool : NSObject
@property(strong,nonatomic)AFHTTPSessionManager *manager;//
@property (retain, nonatomic) NSURLSessionDataTask* requestTask;//请求任务
#pragma mark - 实例化
+ (instancetype)sharedTool;
- (void)getNewsDataWithType:(int)type andPageno:(int)pageno resultWithBlock:(result)finishBlock;

#pragma mark - 新闻详情接口
- (void)getNewsDetailWithNewsId:(NSString *)newid resultWithBlock:(result)finishBlock;


#pragma mark - 招聘列表接口
- (void)getJobListWithPageno:(int)pageno resultWithBlock:(result)finishBlock;

#pragma mark - 招聘详情接口
- (void)getJobDetailWithJobid:(NSString *)jobid resultWithBlock:(result)finishBlock;

#pragma mark - 房产列表接口
- (void)getBuildListWithPageno:(int)pageno district:(NSString *)district address:(NSString *)address area:(NSString *)area house:(NSString *)house total_price:(NSString *)total_price price:(NSString *)price andTitle:(NSString *)title resultWithBlock:(result)finishBlock;

#pragma mark - 房产详情接口
- (void)getBuildingDetailWithBuildId:(NSString *)buidId resultWithBlock:(result)finishBlock;

- (void)getInteractListWithPageno:(int)pageno resultWithBlock:(result)finishBlock;
#pragma mark - 反馈接口
- (void)commitFeedbackWithContent:(NSString *)content resultWithBlock:(result)finishBlock;

#pragma mark - 收藏接口
- (void)addCollectWithBuildingId:(NSString *)bid type:(int)type andIs_cancel:(BOOL)is_cancel resultWithBlock:(result)finishBlock;

#pragma mark - 点赞接口
- (void)addPraiseWithNote_id:(NSString *)note_id andIs_cancel:(BOOL)is_cancel resultWithBlock:(result)finishBlock;

#pragma mark - 评论接口
//pid 回复评论ID  非必传
//note_id 帖子ID
- (void)submitCommentWithNote_id:(NSString *)note_id content:(NSString *)content pid:(NSString *)pid resultWithBlock:(result)finishBlock;

#pragma mark - 我的评论接口
- (void)getMyCommentResultWithBlock:(result)finishBlock;
#pragma mark - 我的点赞接口
- (void)getMyPariseResultWithBlock:(result)finishBlock;

#pragma mark - 我的收藏/通知接口
- (void)getMyCollectWithType:(int)type resultWithBlock:(result)finishBlock;

#pragma mark - 交流详情接口
- (void)getInteractNoteDetailWithNote_id:(NSString *)note_id resultWithBlock:(result)finishBlock;

#pragma mark - 交流评论列表接口
- (void)getInteractNoteCommentListWithNote_id:(NSString *)note_id resultWithBlock:(result)finishBlock;

#pragma mark - 登录接口-----
- (void)loginWithPhone:(NSString *)phone andPwd:(NSString *)password resultWithBlock:(result)finishBlock;
#pragma mark - 注册接口
- (void)rergistWithMobile:(NSString *)mobile andPassword:(NSString *)password
          resultWithBlock:(result)finishBlock;
#pragma mark - 忘记密码接口
- (void)fogertPasswordWithMobile:(NSString *)mobile code:(NSString *)code andPassword:(NSString *)password resultWithBlock:(result)finishBlock;
#pragma mark - 个人资料接口
- (void)getMineInfoResultWithBlock:(result)finishBlock;
#pragma mark - 通知列表接口
- (void)getMyNoticeListResultWithBlock:(result)finishBlock;
#pragma mark - 通知详情接口
- (void)getMyNoticeDetailResultWithNoticeId:(NSString *)noticeId resultBlock:(result)finishBlock;


#pragma mark - 服务列表接口
- (void)getServiceListWithType:(NSString *)type resultBlock:(result)finishBlock;
#pragma mark - 服务详情接口
- (void)getServiceDetailWithServiceId:(NSString *)serviceId resultBlock:(result)finishBlock;
#pragma mark - 天气类型接口
- (void)getWeatherTypeResultWithBlock:(result)finishBlock;
#pragma mark - 天气列表接口
- (void)getWeatherListWithCityId:(NSString *)cityId resultBlock:(result)finishBlock;

#pragma mark - 修改用户名接口
- (void)submitChangePersonInfoWithUsername:(NSString *)username andBirthday:(NSString *)birthday sex:(NSString *)sex resultWithBlock:(result)finishBlock;

#pragma mark - 个人资料接口
- (void)getUserInfoDataResultWithBlock:(result)finishBlock;

#pragma mark - 修改头像接口
- (void)commitChangeMyIconWithfiles:( NSData*)files resultWithBlock:(result)finishBlock;

#pragma mark - 交流添加接口
- (void)addInteractPostWithContent:(NSString *)content resultWithBlock:(result)finishBlock;


@end
